package com.chitang.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 台车信息表
 * @TableName b_trolley_info
 */
@TableName(value ="b_trolley_info")
@Data
public class TrolleyInfo implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 台车id
     */
    private String trolleyId;

    /**
     * 台车编码
     */
    private String trolleyCode;

    /**
     * 台车名称
     */
    private String trolleyName;

    /**
     * 台车类型编码
     */
    private String trolleyTypeCode;

    /**
     * 台车类型名称
     */
    private String trolleyTypeName;

    /**
     * 长
     */
    private BigDecimal trolleyLength;

    /**
     * 宽
     */
    private BigDecimal trolleyWidth;

    /**
     * 高
     */
    private BigDecimal trolleyHeight;

    /**
     * 台车状态 1：未使用，2：报修: 3：报废 4：已使用 5：未回收
     */
    private Integer trolleyStatus;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 描述
     */
    private String remark;

    /**
     * 状态 0 未删除，1已删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TrolleyInfo other = (TrolleyInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTrolleyId() == null ? other.getTrolleyId() == null : this.getTrolleyId().equals(other.getTrolleyId()))
            && (this.getTrolleyCode() == null ? other.getTrolleyCode() == null : this.getTrolleyCode().equals(other.getTrolleyCode()))
            && (this.getTrolleyName() == null ? other.getTrolleyName() == null : this.getTrolleyName().equals(other.getTrolleyName()))
            && (this.getTrolleyTypeCode() == null ? other.getTrolleyTypeCode() == null : this.getTrolleyTypeCode().equals(other.getTrolleyTypeCode()))
            && (this.getTrolleyTypeName() == null ? other.getTrolleyTypeName() == null : this.getTrolleyTypeName().equals(other.getTrolleyTypeName()))
            && (this.getTrolleyLength() == null ? other.getTrolleyLength() == null : this.getTrolleyLength().equals(other.getTrolleyLength()))
            && (this.getTrolleyWidth() == null ? other.getTrolleyWidth() == null : this.getTrolleyWidth().equals(other.getTrolleyWidth()))
            && (this.getTrolleyHeight() == null ? other.getTrolleyHeight() == null : this.getTrolleyHeight().equals(other.getTrolleyHeight()))
            && (this.getTrolleyStatus() == null ? other.getTrolleyStatus() == null : this.getTrolleyStatus().equals(other.getTrolleyStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTrolleyId() == null) ? 0 : getTrolleyId().hashCode());
        result = prime * result + ((getTrolleyCode() == null) ? 0 : getTrolleyCode().hashCode());
        result = prime * result + ((getTrolleyName() == null) ? 0 : getTrolleyName().hashCode());
        result = prime * result + ((getTrolleyTypeCode() == null) ? 0 : getTrolleyTypeCode().hashCode());
        result = prime * result + ((getTrolleyTypeName() == null) ? 0 : getTrolleyTypeName().hashCode());
        result = prime * result + ((getTrolleyLength() == null) ? 0 : getTrolleyLength().hashCode());
        result = prime * result + ((getTrolleyWidth() == null) ? 0 : getTrolleyWidth().hashCode());
        result = prime * result + ((getTrolleyHeight() == null) ? 0 : getTrolleyHeight().hashCode());
        result = prime * result + ((getTrolleyStatus() == null) ? 0 : getTrolleyStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", trolleyId=").append(trolleyId);
        sb.append(", trolleyCode=").append(trolleyCode);
        sb.append(", trolleyName=").append(trolleyName);
        sb.append(", trolleyTypeCode=").append(trolleyTypeCode);
        sb.append(", trolleyTypeName=").append(trolleyTypeName);
        sb.append(", trolleyLength=").append(trolleyLength);
        sb.append(", trolleyWidth=").append(trolleyWidth);
        sb.append(", trolleyHeight=").append(trolleyHeight);
        sb.append(", trolleyStatus=").append(trolleyStatus);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", remark=").append(remark);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}